const { Page } = require('playwright');

class FirstPage {
    constructor(page) {
        this.page = page;
    }

    subcontractListEntry() {
        this.page.getByRole('link', { name: 'SubContract' }).click();
        this.page.getByRole('link', { name: 'SubContract List' }).click();
    }

    orderListEntry() {
        this.page.getByRole('link', { name: 'Order' }).click();
        this.page.getByRole('link', { name: 'Order List', exact: true }).click();
    }

    reportListEntry() {
        this.page.click('li.dropdown > a.dropdown-toggle:has-text("Report")');
        // this.page.getByRole('link', { name: 'Report' }).click();
        this.page.getByRole('link', { name: 'Report List', exact: true }).click();
    }
}

module.exports = {
    FirstPage
};
